@extends('admin.admin')

@section('content')
        <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        商品管理
        <small>推荐位置</small>
        <small>编辑</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li >商品管理</li>
        <li ><a href="/admin/recommend_position">推荐位置</a></li>
        <li class="active">编辑</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">推荐位置添加</h3>
                    <div class="pull-right">
                        <a href="{{Route('admin.recommend_position.index')}}" type="button" class="btn btn-block btn-success btn-xs"><i class="icon  glyphicon glyphicon glyphicon-menu-left"></i> 返回</a>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                {!! Form::model($recommendPosition,['route'=>['admin.recommend_position.update',$recommendPosition->id],'method'=>'put','class'=>'form-horizontal'])  !!}
                    {!! Form::hidden('back_url',@$_SERVER['HTTP_REFERER']) !!}
                    <div class="box-body">
                        <div class="form-group @if($errors->has('name')) has-error   @endif">
                            <label class="col-sm-2 control-label" for="exampleInputEmail1">名称：</label>
                            <div class="col-sm-6">
                            {!! Form::text('name',old('name'),array('class'=>'form-control','placeholder'=>'请填写推荐位置的名称'))!!}
                            </div>
                            <div class="col-sm-8">
                            @if($errors->has('name'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('name')}}</label>
                            @endif
                            </div>
                        </div>
                                                                
                        <div class="form-group @if($errors->has('identification')) has-error   @endif">
                            <label class="col-sm-2 control-label" for="exampleInputPassword1">标识位：</label>
                            <div class="col-sm-6">
                            {!! Form::text('identification',old('identification'),array('class'=>'form-control','placeholder'=>'请填写推荐位置的标识位','readonly'=>'readonly'))!!}
                            </div>
                            <div class="col-sm-8">
                            @if($errors->has('identification'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('identification')}}</label>
                            @endif
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="exampleInputPassword1">描述：</label>
                            <div class="col-sm-6">
                            {!! Form::textarea('description',old('description'),array('class'=>'form-control','placeholder'=>'请对推荐位置进行描述','rows'=>3))!!}
                            </div>
                        </div>


                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <div class="form-group no-padding">
                            <label class="col-sm-2 control-label">&nbsp;</label>
                            <div class="col-sm-3">
                                <button type="submit" class="btn btn-primary">保存</button>
                            </div>
                        </div>
                    </div>
                {!! Form::close()  !!}
            </div>
            <!-- /.box -->
        </div>
    </div>



</section>
<!-- /.content -->


@endsection